
public class Process {
	int processId;
	int parentProgramID;
	int slotValue;
	float arrivalTime, serviceTime, finishTime, timeLeft, Tq;
	double Tqs;
	
	/**
	 * Process constructor.
	 * @param processId
	 * @param arrivalTime
	 * @param serviceTime
	 */
	public Process(int processId, int arrivalTime, int serviceTime) {
		this.processId = processId;
		this.arrivalTime = arrivalTime;
		this.serviceTime = timeLeft = serviceTime;
	}
	
	public float getArrival() {
		return arrivalTime;
	}

	public float getTminus() {
		return timeLeft;
	}

	public int getProcessId() {
		return processId;
	}

	public float getServiceTime() {
		return serviceTime;
	}

	public float getFinish() {
		return finishTime;
	}

	public double getTq() {
		return Tq;
	}

	public double getTqs() {
		return Tqs;
	}
		
	public void servicing() {
		timeLeft--;
	}

	public void report(int t) {
		finishTime = t;
		Tq = finishTime - arrivalTime;
		Tqs = Math.round(Tq / serviceTime);
	}

	public int getParentProgramID() {
		return parentProgramID;
	}

	public void setParentProgramID(int parentProgramID) {
		this.parentProgramID = parentProgramID;
	}

	public int getSlotValue() {
		return slotValue;
	}

	public void setSlotValue(int slotValue) {
		this.slotValue = slotValue;
	} 
} 
